{  Statement: http://acmp.ru/?main=task&id_task=147
   Verdict: Accepted
}
uses
    SysUtils, Math;

var
    i,n:longint;
    a,b,t:int64;    

begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
a := 0;
b := 1;
for i:=2 to n do begin
    t := b;
    inc(b, a);
    a := t;
end;
if n = 0 then write(0) else write(b);
end.
